package com.dokimall.thirdpary.controller;

import com.dokimall.common.utils.R;
import com.dokimall.thirdpary.component.SmsComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    SmsComponent smsComponent;


    @GetMapping("sendcode")
    public R sendCode(@RequestParam("phone") String phone, @RequestParam("code") int code){
        smsComponent.sendSms(phone,code);
        return R.ok();
    }

}
